package seven.test_7_16;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int j = 0; j < n; j++) {
            int[] arr = new int[6];
            for (int i = 0; i < 6; i++) {
                arr[i] = sc.nextInt();
            }
            permute(arr);
        }
    }
    public static void permute(int[] nums) {
        List<List<Integer>> ret = new ArrayList<>();
        List<Integer> path = new ArrayList<>();
        boolean[] check = new boolean[nums.length];
        dfs(nums,ret,path,check);
        for (int i = 0; i < ret.size(); i++) {
            if(isThree(ret.get(i))) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    }
    private static boolean isThree(List<Integer> path) {
        if((path.get(0) + path.get(1) > path.get(2)) && (path.get(3) + path.get(4) > path.get(5))) {
            if((Math.abs(path.get(0) - path.get(1)) < path.get(2)) && (Math.abs(path.get(3) - path.get(4)) < path.get(5))) {
                return true;
            }
        }
        return false;
    }
    private static void dfs(int[] nums,List<List<Integer>> ret,List<Integer> path,boolean[] check) {
        if(nums.length == path.size()) {
            ret.add(new ArrayList<>(path));
            return;
        }
        for(int i = 0; i < nums.length; i++) {
            if(check[i] == false) {
                path.add(nums[i]);
                check[i] = true;
                dfs(nums,ret,path,check);
                // 回溯 -> 恢复现场
                check[i] = false;
                path.remove(path.size() - 1);
            }
        }
    }
}
